﻿
namespace NWebMock
{
    public interface IHttpCacheVaryByHeaders
    {
        #region Properties

        /// <summary>
        /// Gets or sets a value indicating whether the ASP.NET output cache varies the cached responses by the Accept HTTP header, and appends it to the out-going Vary HTTP header.
        /// </summary>
        bool AcceptTypes { get; set; }

        /// <summary>
        /// Gets or sets a custom header field that the ASP.NET output cache varies the cached responses by, and appends it to the out-going Vary HTTP header.
        /// </summary>
        /// <param name="header">The name of the custom header. </param>
        /// <returns>true when the ASP.NET output cache varies by the specified custom field; otherwise, false. The default value is false. </returns>
        bool this[string header] { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the ASP.NET output cache varies the cached responses by the User-Agent header, and appends it to the out-going Vary HTTP header.
        /// </summary>
        bool UserAgent { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the ASP.NET output cache varies the cached responses by the Accept-Charset header, and appends it to the out-going Vary HTTP header.
        /// </summary>
        bool UserCharSet { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the ASP.NET output cache varies the cached responses by the Accept-Language header, and appends it to the out-going Vary HTTP header.
        /// </summary>
        bool UserLanguage { get; set; }

        #endregion

        #region Methods

        /// <summary>
        /// Causes ASP.NET to vary by all header values and sets the Vary HTTP header to the value * (an asterisk). All other Vary header information to be dropped.
        /// </summary>
        void VaryByUnspecifiedParameters();

        #endregion
    }
}
